package bean;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
//@Component("sb")
//@Controller
@Lazy
@Scope("prototype")
public class SomeBean {

//    @Autowired
//    @Qualifier("ob")
//    @Resource
    @Resource(name="otherBean")
    private OtherBean otherBean;

    public void doSome(){
        System.out.println("SomeBean.doSome()");
    }

    public OtherBean getOtherBean() {
        return otherBean;
    }

    public void setOtherBean(OtherBean otherBean) {
        this.otherBean = otherBean;
    }
}
